<template>
  <div class="admin-index">
    <div class="welcome-panel">
      <div class="welcom-info">
        <!--- 超级管理员 --->
        <div class="clearfix">
          <div class="info-left">
            <div class="media">
              <div class="media-left">
                <el-avatar icon="el-icon-user-solid" :src="user.avatar|imgPath" :size="72" />
              </div>
              <div class="media-body">
                <div class="title">
                  您好！{{ user.name }}！
                </div>
              </div>
              <div class="txt">
                欢迎使用油气管道动火作业综合监控平台
              </div>
            </div>
            <div class="line" />
            <!--            <div class="txt2">-->
            <!--              <span class="r">-->
            <!--                WELCOME-->
            <!--              </span>-->
            <!--              TO USE OUR SMART SYSTERM-->
            <!--            </div>-->
            <!--            <div class="btn-info">-->
            <!--              <el-button type="primary">进入大屏</el-button>-->
            <!--            </div>-->
          </div>
          <div class="info-right">
            <img src="@/assets/img/superbg.png">
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
  import permission from '../../directive/permission/index.js' // 权限判断指令
  export default {
    name: 'DashboardAdmin',
    directives: {
      permission
    },
    data() {
      return {
        obj: {},
        auditList: [],
        archiveList: []
      }
    },
    computed: {
      user() {
        return this.$store.state.user
      },
      userId() {
        return this.$store.getters.userId
      }
    }
  }
</script>

<style lang="scss" scoped>
  .clearfix:after,
  .clearfix:before,
  .media:after,
  .media:before {
    display: table;
    content: " ";
  }

  .clearfix:after,
  .media:after {
    clear: both;
  }

  .admin-index .panel {
    background: #f5f5f5;
  }

  .admin-index .panel .panel-body {
    padding: 50px;
  }

  .admin-index .panel .panel-body .media .media-left {
    float: left;
  }

  .admin-index .panel .panel-body .media .media-body {
    overflow: hidden;
    padding-left: 30px;
  }

  .admin-index .panel .panel-body .media .media-body .name {
    color: #8f2d07;
    font-size: 38px;
    margin-top: 20px;
    margin-bottom: 10px;
  }

  .admin-index .panel .panel-body .media .media-body .txt {
    font-size: 20px;
    line-height: 20px;
    color: #000;
  }

  .user-bottom {
    width: 100%;
    height: 643px;
    background-color: #fff;
    position: relative;
  }

  .user-bottom .icon-part {
    width: 320px;
    height: 225px;
    margin: 0 auto;
    position: relative;
    top: 159px;
  }

  .user-bottom .icon-part .tip-more {
    height: 40px;
    font-size: 28px;
    font-weight: 400;
    color: #bbbbbb;
    line-height: 40px;
    text-align: center;
    margin-top: 43px;
  }

  .panel-group {
    margin-top: 18px;

    .card-panel-col {
      margin-bottom: 32px;
    }

    .card-panel {
      height: 108px;
      cursor: pointer;
      font-size: 12px;
      position: relative;
      overflow: hidden;
      color: #666;
      background: #fff;
      box-shadow: 4px 4px 40px rgba(0, 0, 0, .05);
      border-color: rgba(0, 0, 0, .05);

      &:hover {
        .card-panel-icon-wrapper {
          color: #fff;
        }

        .icon-people {
          background: #40c9c6;
        }

        .icon-message {
          background: #36a3f7;
        }

        .icon-money {
          background: #f4516c;
        }

        .icon-shopping {
          background: #34bfa3
        }
      }

      .icon-people {
        color: #40c9c6;
      }

      .icon-message {
        color: #36a3f7;
      }

      .icon-money {
        color: #f4516c;
      }

      .icon-shopping {
        color: #34bfa3
      }

      .card-panel-icon-wrapper {
        float: left;
        margin: 14px 0 0 14px;
        padding: 16px;
        transition: all 0.38s ease-out;
        border-radius: 6px;
      }

      .card-panel-icon {
        float: left;
        font-size: 48px;
      }

      .card-panel-description {
        float: right;
        font-weight: bold;
        margin: 26px;
        margin-left: 0px;

        .card-panel-text {
          line-height: 18px;
          color: rgba(0, 0, 0, 0.45);
          font-size: 16px;
          margin-bottom: 12px;
        }

        .card-panel-num {
          font-size: 20px;
        }
      }
    }
  }

  @media (max-width:550px) {
    .card-panel-description {
      display: none;
    }

    .card-panel-icon-wrapper {
      float: none !important;
      width: 100%;
      height: 100%;
      margin: 0 !important;

      .svg-icon {
        display: block;
        margin: 14px auto !important;
        float: none !important;
      }
    }
  }

  .home-block {
    .home-info1 {
      padding: 30px 40px;
      margin-bottom: 25px;
      background: #fff;

      .media {
        .media-left {
          .el-icon-user-solid {
            font-size: 40px;
            line-height: 70px;
          }
        }

        .media-body {
          padding-top: 10px;

          .title {
            font-size: 20px;
            font-weight: 500;
            color: rgba(0, 0, 0, 0.85);
            line-height: 28px;
            margin-bottom: 5px;
          }

          .txt {
            font-size: 14px;
            font-weight: 400;
            color: rgba(0, 0, 0, 0.45);
            line-height: 22px;
          }
        }
      }

      .list-info {
        li {
          width: 20%;
          float: left;
          text-align: center;
          border-right: 1px solid #E9E9E9;
          cursor: pointer;

          &:last-child {
            border-right: 0;
          }

          .txt {
            font-size: 14px;
            font-weight: 400;
            color: rgba(0, 0, 0, 0.45);
            line-height: 22px;
          }

          .num {
            font-size: 30px;
            font-family: HelveticaNeue;
            color: rgba(0, 0, 0, 0.85);
            line-height: 38px;
          }
        }
      }
    }

    .home-info2 {
      padding: 30px 40px;
      background: #fff;

      .audit-list {
        .item {
          padding: 20px;
          border: 1px solid #eee;
          margin-bottom: 20px;

          .title {
            font-size: 16px;
            font-weight: 500;
            color: rgba(85, 85, 85, 1);
            line-height: 20px;
            margin-bottom: 10px;
            width: 360px;
          }

          .depart {
            font-size: 14px;
            font-weight: 500;
            color: rgba(85, 85, 85, 1);
            line-height: 20px;
            margin-bottom: 10px;

            .name {
              padding-right: 10px;
            }
          }

          .txt {
            font-size: 12px;
            font-weight: 400;
            color: rgba(0, 0, 0, 0.25);
            line-height: 20px;
          }

          .time {
            font-size: 12px;
            font-weight: 400;
            color: rgba(0, 0, 0, 0.25);
            line-height: 20px;
            margin-top: 40px;
          }

          &:hover {
            background: rgba(216, 216, 216, 0.13);
            border: 1px solid #979797;
          }
        }
      }
    }
  }
</style>